package com.vfmall.mapper;

import com.vfmall.entity.DishFlavor;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    public void insertBatch(List<DishFlavor> list);
    @Delete("delete from dish_flavor where dish_id=#{dishId}")
    public void deleteByDishId(Long dishId);
    @Select("select * from dish_flavor where dish_id=#{dishId}")
    public List<DishFlavor> getByDishId(Long dishId);
    @Update("update dish_flavor set name=#{dishFlavor.name},value=#{dishFlavor.value} where dish_id=#{dishId}")
    public void updateByDishId(DishFlavor dishFlavor,Long dishId);
}
